Media memory system

ABSTRACT

A method and apparatus for matching parent processor address translations to media processors&#39; address translations and providing concurrent memory access to a plurality of media processors through separate translation table information. In particular, a page directory for a given media application is copied to a media processor&#39;s page directory when the media application allocates memory that is to be shared by a media application running on the parent processor and media processors.

BACKGROUND

Implementations of the claimed invention generally may relate tocommunication of media information and, more particularly, to memoryaccess for multiple media processors.

Media-capable PC systems require high speed memory systems for both thehost CPU and media processor(s). The CPU and media processors may cachefrequently used data and address translations. Certain parts of themedia processing may be subject to strict frame timing constraintsassociated with live video and audio, suggesting the need for separatelystored address translations. In particular, the CPU and media processorspreferably have rapid access to a common memory system to perform theirdifferent parts of the media processing and for the various mediaprocessing units to synchronize quickly between themselves and the CPU.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate one or more implementationsconsistent with the principles of the invention and, together with thedescription, explain such implementations. The drawings are notnecessarily to scale, the emphasis instead being placed uponillustrating the principles of the invention. In the drawings

FIG. 1 illustrates an example system;

FIG. 2 illustrates an example implementation of a media memory process;and

FIG. 3 is a flow chart illustrating an example process of providing amedia memory system.

DETAILED DESCRIPTION

The following detailed description refers to the accompanying drawings.The same reference numbers may be used in different drawings to identifythe same or similar elements. In the following description, for purposesof explanation and not limitation, specific details are set forth suchas particular structures, architectures, interfaces, techniques, etc. inorder to provide a thorough understanding of the various aspects of theclaimed invention. However, it will be apparent to those skilled in theart having the benefit of the present disclosure that the variousaspects of the invention claimed may be practiced in other examples thatdepart from these specific details. In certain instances, descriptionsof well-known devices, circuits, and methods are omitted so as not toobscure the description of the present invention with unnecessarydetail.

FIG. 1 illustrates an example system. System 100 includes a processor102, which in one embodiment may be a parent processor (also referred tofor descriptive reasons as a “parent” processor). System 100 may alsoinclude one or more additional processors 104, which in one embodimentmay be referred to as “media” processors (also referred to fordescriptive reasons as “additional” processors). The embodiment is notrestricted to use with a particular type of processor. Indeed, theembodiment is described in connection with generally understoodstructures and signals of processors and memories. Processors 102 and104 may include a general-purpose or a specific-purpose processingdevice and/or logic. Processor 102 and 104 may be arranged to processmedia information. Particular embodiments, however, include structurespresently used in the Pentium® microprocessor marketed by IntelCorporation and in related chip sets. However, the present invention isnot limited to use with the below-recited structure and signals used inthe Pentium® processor.

In some implementations, additional processors 104 process mediainformation (and possibly other communication-related information). Forthe purposes of explanation, the media information transmitted mayinclude video and/or voice information, but the claimed invention is notlimited in this regard. System 100 may receive and process other typesof media information consistent with the description herein. The mediainformation processed by processors may include video informationencoded in a format such as MPEG-1, MPEG-2, MPEG-4, H.264, Windows MediaVideo version 9 (WMV9), JPEG2000 and Advanced Video System (AVS)formats. The claimed invention is not limited to the formatsspecifically mentioned herein, rather any now-known or later-developedmedia format may be used in accordance with the schemes disclosedherein. The media information may also or alternately include otherinformation, such as telephony or other audio information.

Most general purpose microprocessors make use of virtual or demand-pagedmemory schemes, where sections of a program's execution environment aremapped into physical memory as needed. Virtual memory schemes allow theuse of physical memory much smaller in size than the linear addressspace of the microprocessor, and also provide a mechanism for memoryprotection so that multiple tasks (programs) sharing the same physicalmemory cannot adversely interfere with each other. Parent processor 102communicates with memory 106 via chipset 108. Chipset 108 may also serveas a bridge to other busses, such as peripheral component bus, whichconnects to media processors 104 and various I/O devices 110.

With most modern computer systems, a microprocessor refers to a locationusing a linear address, but an object is retrieved from a specificmemory location by providing its physical address on an address bus.Linear addresses may be the same as physical addresses, in which caseaddress translation is not required. However, usually a virtual memoryscheme is employed in which linear addresses are translated intophysical addresses. In this case, a linear address may also be referredto as a virtual address. The linear address space is the set of alllinear addresses generated by a microprocessor, whereas the physicaladdress space is the set of all physical addresses.

A virtual or demand-paged memory system may be illustrated as a mappingbetween a linear (virtual) address space and a physical address space.In a virtual memory system, the linear and physical address spaces aredivided into blocks of contiguous addresses, customarily referred to aspages if they are of constant size or are any of several fixed sizes. Atypical page size may be 4 KBytes, for example. Example implementationsof system 100 may include memory references generated by parentprocessor 102 and a plurality of additional processors 104 accessingcommon memory 106, although the claimed invention is not limited in thisregard.

FIG. 2 illustrates an example implementation of a media memory process.In particular, an example relationship between processor 202, additionalprocessors 204, memory 206 and address translation is illustrated.Additional processors 204 may share memory 206 with parent processor202. For example, in one embodiment, parent processor 202 and additionalprocessors 204 in the form of media processors share the addresstranslation system in situations where media frame timing requirementsare less stringent. Parent processor 202 may include a control unit (notshown) which has numerous registers provided therein including a controlregister 206 such as CR3. Control register 208 contains an address wherea page directory is located. Embodiments of the invention maintain thesame common data structures and some of the same operating procedures tomanage the contents of control register 208. At the same time, aduplicate of the data structures is provided for additional processors204.

Concurrent memory access for multiple media processors 204 may beprovided via separate translation table hardware, each private to asingle media application. Since parent processor address translationsmatch the media processor(s)' translations, parent processor 202 mayexchange memory pointers without alteration. As discussed in detailbelow, one way to implement this is to copy the parent processor's pagedirectory for a given media application to the media processor's pagedirectory. This may be done when the media application allocates memorythat may be shared by a media application running on parent processor202 and media processor(s) 204.

The data in either main memory 214 or parent processor or mediaprocessor(s)' data caches (not shown) may be retained rather thanswapped to disk. Retaining data in main memory 214 constrains themaximum access latency seen by media applications, which allows them tobe directly gated by media timing signals. Data may be simultaneouslycacheable from the parent processor 202 and media processors 204 withoutrequiring it to be swapped to disk, as in conventional arrangements.

Concurrent memory access allows a media application's forward progressto be gated directly by appropriate media timing signals, such as thedisplay system's vertical retrace signal, or a synchronization signalgenerated by an incoming TV stream, rather than relying on the parentprocessor's operating system for these timing services. This may alsoallow for improved robustness against “dropped video frames” for reducedvideo buffering which lowers cost, or for reduced media processinglatency, which may be important for selected interactive applicationsand also for simpler designs since media processors 204 do not needpre-emptive scheduling hardware. Concurrent memory access may alsoeliminate swap overhead that may occur if media processor(s) 204 mustrun the media application only when the parent application is running onparent processor 202.

Each media memory transaction to access its region of physical memorymay be limited, preventing a malfunction in one application fromcorrupting data belonging to another application. In the event anapplication generates an out-of-bounds address, the translation systemmay signal an addressing fault. This may be accomplished in the mediaprocessors' memory address translation units where the media process IDselects the proper address translation for that process.

Although systems 100 and 200 in FIGS. 1 and 2 including discretecomponents, these components may be implemented in hardware,software/firmware, or some combination thereof. When implemented inhardware, some components of systems 100 and 200 may be combined in acertain chip or device.

The mapping shown in FIG. 2 illustrates a generic two-level hierarchicalmapping comprising directory tables and page tables. Page directorytables and page tables are stored in physical memory, and are usuallythemselves equal in size to a page. A page directory table entry (PDE)points to one or more page tables in physical memory, and a page tableentry (PTE) points to a page in physical memory. Parent processor 202and additional processors 204 share main memory 206. In the first levelof mapping, control register 208 points to a page directory. Controlregister 208 chooses page directory memory 210. In the second level ofmapping, entries in page directory 210 point to page tables 212. Entriesin those pages point to the actual pages 214 of memory where the userdata resides.

Some microprocessors employ several modes for translating linearaddresses into physical addresses. In one mode, the first 12 bits of alinear address are used as an offset to a physical address within a pageframe, the next 10 bits of the linear address are used as an offset intoa page table, and the highest 10 bits of the linear address are used asan offset into a page directory. One skilled in the art will recognizethat other modes for translating 32 bit linear addresses may be used aswell and the present embodiment is not limited to any particular mode orto a 32 bit linear address.

Embodiments of the invention are directed to the memory system that doesaddress translation. The same or similar data structures and operatingprocedures to manage the contents of control register 212 are maintainedeven when parent process 202 is swapped out. In particular, in oneembodiment, a duplicate of the data structures is provided foradditional processes 204. Data structures include page directories 208,page tables 210, and page frames 206. Entries in those pages point tothe actual pages 214 of memory where the user data is stored. Thecontents of page tables 212 are stored in any suitable memory componentsuch as main memory 206. Page table directory 210 and page tables 210are stored in main memory 206 and accessed as described herein.

In a typical implementation, this allows additional processors 204, suchas media processors, to have access to memory 206 after parent process202 is swapped out. Conventionally, when parent process 202 is swappedout, its address mapping is swapped out too and its memory is no longeraccessible. For example, in running a video encode stream, mediaprocessors 204 may be executing another program as well. When parentprocessor 202 is swapped out, the address space may become inaccessiblefor both parent processor 202 and media processors 204. The presentembodiment provides media processor address mappings that arepersistent, despite parent process 202 being swapped out, to meet realtime media processing deadlines.

A shared memory is attached to individual processing engines. Mediaprocessor 204 is uninterrupted while the application running on parentprocessor 202 is swapped out. For example, application running on parentprocessor 202 may be swapped out so the operating system can runsomething else on parent processor 202. In particular, a timer basedapplication on Windows operating system was scheduled to run. In anotherexample, an application running on parent processor 202 may be swappedout because the user changed desktop focus. Certain media applications,such as video encode or decode, preferably run uninterrupted to the endof the video frame even if the application on the parent processor 202must be swapped out.

As shown in FIG. 2, page tables are set up in a copy operation 216. Thepage directory 210 that was in use before the parent application wasswapped out may remain. The parent processor 202 running in the parentprocessor context then provides an instruction to duplicate addresstranslation data for the media processors 204 in use. For example, mediaprocessors 204 run a video application, such as bringing information infrom a tuner, processing and playing it back on a television or computermonitor. During this time, some other operation may need to be performedby parent processor 202 such as formatting a floppy disk.Conventionally, the operating system interrupts the media processors 204so main processor 202 can run the floppy disk utility application. Inparticular, the operating system halts the application, and reloadscontrol register 208 with a different page table address (or differentset of page tables). The application running on additional processors204 ceases until the operating system resumes executing the originalprocess.

In the present embodiment, the page mappings in the media processorcontext are not disturbed by changing the contents of control register208. Media processors 0-n 204 continue processing because they have avalid page directory 218 and valid page tables 220 that still point tophysical memory 214 that is accessible even though the top set of pagetables 212 (copied during the copy operation 216) have been inactivated.

The page directory 210 and page tables 212 associated with parentprocessor 202 are reactivated. If the operating system restored theprevious contents of control register 208, the process is completed. Ifnot, new information is loaded into the two sets of page tables 212 and220.

FIG. 3 is a flow chart illustrating a process 300 of providing a mediamemory system for uninterrupted processing of information by additionalprocessors sharing a memory with a parent processor when a parentprocessor is interrupted. The application executing on a parentprocessor can be suspended without disturbing applications running onadditional processors. Although process 300 may be described with regardto system 200 shown in FIG. 2 for ease of explanation, the claimedinvention is not limited in this regard.

Parent processor 202 and media processors 204 run parallel operationsconcurrently using shared memory 214 (act 302).

It is then determined whether a new task is about to be implemented onparent processor 202 (act 304). For example, a new task may be detectedwhen the parent processor 202 runs to the end of its timeslot or anotherhigher priority must be run instead.

If act 304 does not detect a new task about to be implemented on parentprocessor 202, processing continues (act 302). If act 304 detects newtask about to be implemented on parent processor 202, operating systemmay then provide instructions to halt what is currently running onparent processor 202 and save its memory addressing context (act 306).

Operating system may reload control register 208 with new contextassociated with the scheduled task that is about to start (act 308).

Before transferring to the new tasks, parent processor 202 provides aninstruction to copy page directory 210 and page tables 212 for mediaprocessors 104 (act 310). Duplicate page directories 218 and page tables220 are set up in the copy operation (act 312). In particular, pagedirectory 210 and page tables 212 are copied for media processors 204.

The instructions that were about to be executed are known so executionstarts at that the last address and instruction. The operating systemjumps to the last address and instruction and begins execution (act312).

Parent processor 202 and additional processors (in media processorcontext) 204 run concurrently (act 314).

Processors may be implemented, for example, with a conventionalprocessor 202 plus some number of smaller processor cores, correspondingto additional processors 204. Top context would correspond to a singleIA 32 processor (or hyper threaded one or multiple of them). CPU andmedia processors may cache frequently used data and address translation.Certain parts of the media processing may be subject to timingconstraints associated with live video and audio suggesting the need fora separately stored address translation.

Although several exemplary implementations have been discussed, theclaimed invention should not be limited to those explicitly mentioned,but instead should encompass any device or interface including more thanone processor capable of processing, transmitting, outputting, orstoring information.

Process 300 may be implemented, for example, in software that may beexecuted by processors 202 and 204 or another portion of local system200.

The foregoing description of one or more implementations consistent withthe principles of the invention provides illustration and description,but is not intended to be exhaustive or to limit the scope of theinvention to the precise form disclosed. Modifications and variationsare possible in light of the above teachings or may be acquired frompractice of various implementations of the invention.

No element, act, or instruction used in the description of the presentapplication should be construed as critical or essential to theinvention unless explicitly described as such. Also, as used herein, thearticle “a” is intended to include one or more items. Variations andmodifications may be made to the above-described implementation(s) ofthe claimed invention without departing substantially from the spiritand principles of the invention. All such modifications and variationsare intended to be included herein within the scope of this disclosureand protected by the following claims.

1. A method, comprising: matching primary processor address translationsto at least one secondary processor address translation; providingconcurrent shared memory access to at least one secondary processorthrough separate translation table information; and exchanging real-timedata between the primary and at least one secondary processor though theshared memory.
 2. The method of claim 1, wherein matching primaryprocessor address translations to at least one secondary processoraddress translation comprises: copying a page directory for a givenapplication to a secondary processor's page directory when theapplication allocates memory that is to be shared by the applicationrunning on the primary and secondary processors.
 3. The method of claim1, further comprising: limiting each memory transaction to access itsregion of physical memory.
 4. The method of claim 2, wherein limitingeach memory transaction to access its region of physical memoryincludes: signaling an addressing fault in response to an applicationgenerating an out of bounds address.
 5. The method of claim 1,comprising: retaining data in either shared memory, or caches associatedwith primary processor or secondary processor.
 6. The method claimed inclaim 1, wherein the at least one secondary processor comprises at leastone media processor.
 7. The method claimed in claim 6, furthercomprising: executing a real-time part of a media process on at leastone media processor.
 8. The method claimed in claim 1, furthercomprising: allocating and deallocating memory used to contain real-timemedia data
 9. The method claimed in claim 1, further comprising:synchronizing at least one secondary processor with externally suppliedtiming signals without delays caused by an operating system
 10. Amachine-accessible medium including instructions that, when executed,cause a machine to: match first processor address translations to atleast one secondary processor address translation; enable common memoryaccess to at least one secondary processor through dedicated translationtable information; and share data between the first and at least onesecondary processor though the common memory.
 11. The machine-accessiblemedium claimed in claim 10, wherein instructions to match firstprocessor address translations to at least one secondary processoraddress translation further includes instructions that, when executed,cause the machine to: copy a page directory for a given application to asecondary processor's page directory when the application allocatesmemory that is to be shared by the application running on the first andsecondary processors.
 12. A system, comprising: a memory; and acontroller to match primary processor address translations to at leastone secondary processor address translation, provide concurrent sharedaccess to the memory to at least one secondary processor throughseparate translation table information, and exchange real-time databetween the primary and at least one secondary processor though thememory.
 13. The system of claimed in claim 12, the controller copies apage directory for a given application to a secondary processor's pagedirectory when the application allocates memory that is to be shared bythe application running on the primary and secondary processors.
 14. Thesystem claimed in claim 12, wherein data is retained in memory, orcaches associated with primary processor or secondary processor.
 15. Thesystem claimed in claimed in claim 12, wherein the controller allocatesand deallocates memory used to contain real-time media data
 16. Thesystem claimed in claim 12, further comprising: synchronizing at leastone secondary processor with externally supplied timing signals withoutdelays caused by an operating system
 17. An apparatus, comprising: anaddress translator to match primary processor address translations to atleast one secondary processor address translation, provide concurrentshared access to the memory to at least one secondary processor throughseparate translation table information, and exchange real-time databetween the primary and at least one secondary processor though thememory.
 18. The apparatus claimed in claim 17, wherein the addresstranslator copies a page directory for a given application to asecondary processor's page directory when the application allocatesmemory that is to be shared by the application running on the primaryand secondary processors.
 19. The apparatus claimed in claim 17, whereinthe address translator directs data to be retained in either sharedmemory, or caches associated with a primary processor or secondaryprocessor.